﻿@model CodeSaude.Application.ViewModels.UsuarioViewModel

@{
    Layout = null;
    ViewBag.Title = "Inserir Usuário";
}

<div class="modal-dialog">
    <div class="modal-content" style="margin:20px; width:auto !important;">
        @using (Html.BeginForm(null, null, FormMethod.Post, new { id = "formUsuario" }))
        {
            @Html.HiddenFor(m => m.UsuarioId)
            @Html.HiddenFor(m => m.Senha)

            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title">@ViewBag.TituloModal</h4>
            </div>

            @Html.AntiForgeryToken()

            <div class="form-group">
                <div class="row" style="margin: 10px 20px 10px 20px">
                    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-12 col">
                        @Html.LabelFor(model => model.Nome, new { @class = "control-label" })
                        @Html.EditorFor(model => model.Nome, null, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Nome, null, new { @class = "text-danger" })
                    </div>
                    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-12 col">
                        @Html.LabelFor(model => model.Email, new { @class = "control-label" })
                        @Html.EditorFor(model => model.Email, null, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Email, null, new { @class = "text-danger" })
                    </div>
                </div>
                <div class="row" style="margin: 10px 20px 10px 20px">
                    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 col">
                        @Html.LabelFor(model => model.Cpf, new { @class = "control-label" })
                        @Html.EditorFor(model => model.Cpf, null, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Cpf, null, new { @class = "text-danger" })
                    </div>
                    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 col">
                        @Html.LabelFor(model => model.Login, new { @class = "control-label" })
                        @Html.EditorFor(model => model.Login, null, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Login, null, new { @class = "text-danger" })
                    </div>
                </div>
                <div class="row" style="margin: 10px 20px 10px 20px">
                    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 col">
                        @Html.LabelFor(model => model.IdSituacao, new { @class = "control-label" })
                        @Html.DropDownListFor(model => model.IdSituacao, Model.ListaSituacoes, "Selecione", new { @class = "form-control", @id = "TipoAgendaId" })
                        @Html.ValidationMessageFor(model => model.IdSituacao, null, new { @class = "text-danger" })
                    </div>
                    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 col">
                        @Html.LabelFor(model => model.GrupoUsuarioId, new { @class = "control-label" })
                        @Html.DropDownListFor(model => model.GrupoUsuarioId, Model.ListaGruposUsuario, "Selecione", new { @class = "form-control", @id = "TipoAgendaId" })
                        @Html.ValidationMessageFor(model => model.GrupoUsuarioId, null, new { @class = "text-danger" })
                    </div>
                </div>
            </div>

            <div class="modal-footer" style="width:100%; float:left;">
                <input type="submit" value="Salvar" id="btnSubmitUsuario" class="btn btn-primary" />
                <input type="button" value="Cancelar" class="btn btn-default" data-dismiss="modal" />
            </div>
        }
    </div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->

@Scripts.Render("~/Scripts/Entities/Usuario/Usuario.js")